home *** CD-ROM | disk | FTP | other *** search
/ Champak 59 / Volume 59 - JOGO DISK .iso / Games / abyss02.swf / scripts / __Packages / ResultCheck.as
Text File  |  2008-03-12  |  2KB  |  71 lines

  1. class ResultCheck
  2. {
  3.    var starArr = new Array(0,1,3,5,7);
  4.    var abyss_boarddriversLebleArr = new Array(50,200,500,1000);
  5.    var abyss_bricksLebleArr = new Array(4,10,30,100);
  6.    var abyss_jungleairplaneLebleArr = new Array(99,300,600,1000);
  7.    var abyss_cubemoaLebleArr = new Array(99,300,1000,2000);
  8.    var abyss_filsalLebleArr = new Array(49,100,300,1000);
  9.    var abyss_jujuLebleArr = new Array(49,300,1000,5000);
  10.    var abyss_gunmanLebleArr = new Array(49,200,500,1000);
  11.    var nowLebleArr = new Array();
  12.    function ResultCheck(mc, userId, ip, gameName, point)
  13.    {
  14.       this._mc = mc;
  15.       this.userId = userId;
  16.       this.ip = ip;
  17.       this.gameName = gameName;
  18.       this.point = point;
  19.       trace(this._mc);
  20.       trace(userId);
  21.       trace(ip);
  22.       trace(gameName);
  23.       trace(point);
  24.    }
  25.    function starCalF()
  26.    {
  27.       trace("start");
  28.       var _loc3_ = undefined;
  29.       trace("point = " + this.point + ", nowArr = " + this.nowLebleArr[this.nowLebleArr.length - 1] + "," + (this.point > this.nowLebleArr[this.nowLebleArr.length]));
  30.       if(this.point > this.nowLebleArr[this.nowLebleArr.length - 1])
  31.       {
  32.          _loc3_ = this.nowLebleArr.length;
  33.       }
  34.       else
  35.       {
  36.          var _loc2_ = 0;
  37.          while(_loc2_ < this.nowLebleArr.length)
  38.          {
  39.             if(this.nowLebleArr[_loc2_] >= this.point)
  40.             {
  41.                _loc3_ = _loc2_;
  42.                break;
  43.             }
  44.             _loc2_ = _loc2_ + 1;
  45.          }
  46.       }
  47.       this.star = this.starArr[_loc3_];
  48.       this.gameEndMcF();
  49.    }
  50.    function gameEndMcF()
  51.    {
  52.       this._mc.gotoAndStop("pointSaveF");
  53.       this._mc.point = this.point;
  54.       this._mc.star = this.star;
  55.       this.resltF();
  56.    }
  57.    function resltF()
  58.    {
  59.       this._mc.gotoAndStop("loginF");
  60.       this._mc.B1.onRelease = function()
  61.       {
  62.          this._parent.gotoAndStop(1);
  63.          _root.startGame();
  64.       };
  65.       this._mc.B2.onRelease = function()
  66.       {
  67.          getUrl("http://kr.abyss.teen.yahoo.com/", "_blank");
  68.       };
  69.    }
  70. }
  71.